

KERN_DIR = /home/shenzhenming/hi3536_2.06/Hi3536_SDK_V2.0.6.0/osdrv/opensource/kernel/linux-3.10.y
all:
	make -C $(KERN_DIR) M=`pwd` modules 
	$(CROSS_COMPILE)gcc -o led_drv_test led_drv_test.c 

clean:
	make -C $(KERN_DIR) M=`pwd` modules clean
	rm -rf modules.order
	rm -f led_drv_test

# 参考内核源码drivers/char/ipmi/Makefile
# 要想把a.c, b.c编译成ab.ko, 可以这样指定:
# ab-y := a.o b.o
# obj-m += ab.o

# leddrv.c board_demo.c 编译成 100ask.ko
my_led-y := led_drv.o board_demo.o
obj-m	+= my_led.o

